package com.wqy.netty.model;

/**
 * @Auther: WangQingyang
 * @Date: 2020/3/31 15:15
 * @Description:
 */
public class Response {
    /**
     * 请求模块
     */
    private short module;
    /**
     * 请求命令
     */
    private short cmd;
    /**
     * 状态码
     */
    private int stateCode;
    /**
     * 请求数据
     */
    private byte[] data;

    public short getModule() {
        return module;
    }

    public void setModule(short module) {
        this.module = module;
    }

    public short getCmd() {
        return cmd;
    }

    public void setCmd(short cmd) {
        this.cmd = cmd;
    }

    public int getStateCode() {
        return stateCode;
    }

    public void setStateCode(int stateCode) {
        this.stateCode = stateCode;
    }

    public byte[] getData() {
        return data;
    }

    public void setData(byte[] data) {
        this.data = data;
    }

    public int getDataLength() {
        if (data == null)
            return 0 ;
        return data.length;
    }

}
